<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
   {% if summary %}
   <meta name="description" content="{{ summary|striptags }}">
    {% else %}
    <meta name="description" content="Documentation for {{ project }}">
   {% endif %}
    <meta name="author" content="{{ author }}" >
    <link rel="icon" href="{{ project_url }}/favicon.png">

    <title>{% block title %} {{ project }} {% endblock title %}</title>

    <link href="{{ project_url }}/css/bootstrap.min.css" rel="stylesheet">
    <link href="{{ project_url }}/css/pygments.css" rel="stylesheet">
    <link href="{{ project_url }}/css/font-awesome.min.css" rel="stylesheet">
    <link href="{{ project_url }}/css/local.css" rel="stylesheet">
    {% if search|lower == 'true' %}
    <link  href="{{ project_url }}/tipuesearch/tipuesearch.css" rel="stylesheet">
    {% endif %}
    {% if css %}
    <link href="{{ project_url }}/css/user.css" rel="stylesheet">
    {% endif %}

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    
    <script src="{{ project_url }}/js/jquery-2.1.3.min.js"></script>
    <script src="{{ project_url }}/js/svg-pan-zoom.min.js"></script>

  </head>

  <body>

    <!-- Fixed navbar -->
    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="{{ project_url }}/index.html">{{ project }} {% if version %}<small>{{ version }}</small>{% endif %}</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
        {% if pages %}
            <li>{{ pages }}</li>
      {% endif %}
            <li class="dropdown hidden-xs visible-sm visible-md hidden-lg">
              <a href="#" class="dropdown-toggle"
              data-toggle="dropdown" role="button"
              aria-haspopup="true"
     aria-expanded="false">Contents <span class="caret"></span></a>
        <ul class="dropdown-menu">
          {% if incl_src == "true" %}
              {% if project.files|length + project.extra_files|length > 1 %}
            <li><a href="{{ project_url }}/lists/files.html">Source Files</a></li>
        {% else %}
            <li><a href="{{project.files[0].get_url()}}">Source File</a></li>
        {% endif %}
        {% endif %}
        {% if project.modules|length > 0 %}
            <li><a href="{{ project_url }}/lists/modules.html">Modules</a></li>
        {% endif %}
            {% if project.blockdata|length > 1 %}
    <li><a href="{{ project_url }}/lists/blockdata.html">Block Data Units</a></li>
    {% elif project.blockdata|length == 1 %}
    <li><a href="{{ project.blockdata[0].get_url() }}">Block Data</a></li>
    {% endif %}
                                {% if project.procedures|length > 0 %}
            <li><a href="{{ project_url }}/lists/procedures.html">Procedures</a></li>
        {% endif %}
        {% if project.absinterfaces|length > 0 %}
            <li><a href="{{ project_url }}/lists/absint.html">Abstract Interfaces</a></li>
        {% endif %}       {% if project.types|length > 0 %}
            <li><a href="{{ project_url }}/lists/types.html">Derived Types</a></li>
        {% endif %}
        {% if project.programs|length > 1 %}
            <li><a href="{{ project_url }}/lists/programs.html">Programs</a></li>
        {% elif project.programs|length == 1 %}
            <li><a href="{{ project.programs[0].get_url() }}">Program</a></li>
      {% endif %}
            </ul>
            </li>
{% if incl_src == "true" %}
{% if project.files|length + project.extra_files|length > 1 %}
<li class="visible-xs hidden-sm visible-lg"><a href="{{ project_url }}/lists/files.html">Source Files</a></li>
{% else %}
<li class="visible-xs hidden-sm visible-lg"><a href="{{project.files[0].get_url()}}">Source File</a></li>
{% endif %}
{% endif %}
{% if project.modules|length > 0 %}
<li class="visible-xs hidden-sm visible-lg"><a href="{{ project_url }}/lists/modules.html">Modules</a></li>
{% endif %}
{% if project.blockdata|length > 1 %}
<li class="visible-xs hidden-sm visible-lg"><a href="{{ project_url }}/lists/blockdata.html">Block Data Units</a></li>
{% elif project.blockdata|length == 1 %}
<li class="visible-xs hidden-sm visible-lg"><a href="{{ project.blockdata[0].get_url() }}">Block Data</a></li>
{% endif %}
{% if project.procedures|length > 0 %}
<li class="visible-xs hidden-sm visible-lg"><a href="{{ project_url }}/lists/procedures.html">Procedures</a></li>
{% endif %}
{% if project.absinterfaces|length > 0 %}
<li class="visible-xs hidden-sm visible-lg"><a href="{{ project_url }}/lists/absint.html">Abstract Interfaces</a></li>
{% endif %}                             {% if project.types|length > 0 %}
<li class="visible-xs hidden-sm visible-lg"><a href="{{ project_url }}/lists/types.html">Derived Types</a></li>
{% endif %}
{% if project.programs|length > 1 %}
<li class="visible-xs hidden-sm visible-lg"><a href="{{ project_url }}/lists/programs.html">Programs</a></li>
{% elif project.programs|length == 1 %}
<li class="visible-xs hidden-sm visible-lg"><a href="{{ project.programs[0].get_url() }}">Program</a></li>
{% endif %}
          </ul>
        {% if search|lower == 'true' %}
        <form action="{{ project_url }}/search.html" class="navbar-form navbar-right" role="search">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="Search" name="q" id="tipue_search_input" autocomplete="off" required>
        </div>
<!--
        <button type="submit" class="btn btn-default">Submit</button>
-->
        </form>
        {% endif %}
        </div><!--/.nav-collapse -->
      </div>
    </nav>

    <div class="container">
    {% block body %}
    {% endblock body %}
    <hr>    
    </div> <!-- /container -->
    <footer>
      <div class="container">
      <div class="row">
        <div class="col-xs-6 col-md-4"><p>&copy; {{ year }} {{ license }}
                                          {% if revision %}<br /><small>{{ revision }}</small>{% endif %}</p></div>
        <div class="col-xs-6 col-md-4 col-md-push-4">
          <p class="text-right">
            Documentation generated by 
            <a href="https://github.com/cmacmackin/ford">FORD</a>
            {% if print_creation_date|lower == 'true' %} on {{ creation_date }} {% endif %}
          </p>
        </div>
        <div class="col-xs-12 col-md-4 col-md-pull-4"><p class="text-center"> {{ project }} was developed by {{ author }}</p></div>
      </div>
      <br>
      </div> <!-- /container -->    
    </footer>

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
<!--
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
-->
    <script src="{{ project_url }}/js/bootstrap.min.js"></script>
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="{{ project_url }}/js/ie10-viewport-bug-workaround.js"></script>

    <!-- MathJax JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        TeX: { extensions: ['AMSmath.js','AMSsymbols.js','noErrors.js','noUndefined.js'], equationNumbers: { autoNumber: 'AMS' } },
        jax: ['input/TeX','input/MathML','output/HTML-CSS'],
        extensions: ['tex2jax.js','mml2jax.js','MathMenu.js','MathZoom.js']
      });
    </script>
    {% if mathjax_config %}
    <script src="{{ project_url }}/js/MathJax-config/{{ path.basename(mathjax_config) }}"></script>
    {% endif %}
    <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    
    {% if search|lower == 'true' %}
    <script src="{{ project_url }}/tipuesearch/tipuesearch_content.js"></script>
    <script src="{{ project_url }}/tipuesearch/tipuesearch_set.js"></script>
    <script src="{{ project_url }}/tipuesearch/tipuesearch.js"></script>
    {% endif %}
    
  </body>
</html>
